package cn.slipi.common.enums;

public enum ResponseCode {
    SUCCESS(0, "成功"),

    /* 参数错误：10001-19999 */
    PARAM_IS_INVALID(400, "参数无效"),

    FAIL(10000, "失败"),

    NOT_FOUND(404, "请求不存在"),

    BIZ_ERROR(10000, "业务异常"),

    SYSTEM_ERROR(500, "系统异常，请稍后重试");


    private Integer code;
    private String msg;

    ResponseCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer code() {
        return this.code;
    }

    public String msg() {
        return this.msg;
    }
}
